<template>
  <div class="confirm-dialog flex-center">
    <div class="dialog">
      <div class="text-body flex-center">{{text}}</div>
      <div class="btn-group flex-around">
        <el-button size="mini" type="primary" @click="$emit('confirm')">确定</el-button>
        <el-button size="mini" @click="$emit('cancel')">取消</el-button>
      </div>
    </div>
    <div class="bg" @click="$emit('cancel')"></div>
  </div>
</template>
<script>
export default {
  props: ["text"]
};
</script>


<style lang="scss" scoped>
.confirm-dialog,
.bg {
  z-index: 10;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}
.dialog {
  position: relative;
  z-index: 20;
  width: 350px;
  min-height: 150px;
  padding: 18px 25px;
  margin-top: -200px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 1);
  box-shadow: 0px 0px 20px 0px rgba(61, 118, 249, 0.18);
}
.text-body {
  min-height: 60px;
  margin-bottom: 20px;
  font-size: 20px;
  font-weight: bold;
}
.btn-group {
  button {
    width: 120px;
  }
}
</style>
